package login

import (
	"4-7zk/common/proto/user"
	"4-7zk/service/server"
	"context"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) Login(ctx context.Context, req *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Login(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) CourseShow(ctx context.Context, req *user.CourseShowReq) (*user.CourseShowResp, error) {
	login, err := server.CourseAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) Reservation(ctx context.Context, req *user.ReservationReq) (*user.ReservationResp, error) {
	login, err := server.Reservation(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) ReservationAdd(ctx context.Context, req *user.ReservationAddReq) (*user.ReservationAddResp, error) {
	login, err := server.ReservationAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) ReservationList(ctx context.Context, req *user.ReservationListReq) (*user.ReservationListResp, error) {
	login, err := server.ReservationList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) ReservationUpdate(ctx context.Context, req *user.ReservationUpdateReq) (*user.ReservationUpdateResp, error) {
	login, err := server.ReservationUpdate(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
